@import 'theme';
@import 'functions';
@import 'mixins';

// cx-card color variables
$cx-card-border-color: 'light' !default;
$cx-card-delete-mode-background-color: 'background' !default;
$cx-card-delete-msg-color: 'danger' !default;

// cx-card variables
$cx-card-border: 1px solid !default;
$cx-card-body-delete-padding: 1rem 0 0 0 !default;
$cx-card-body-delete-msg-padding: 0 0 1.25rem 0 !default;
$cx-card-body-actions-container-padding: 1.25rem 0 0 0 !default;
$cx-card-body-actions-container-card-link-padding: 0 0 0 1rem !default;

.cx-card {
  &--border {
    border: $cx-card-border;
    @include var-color('border-color', $cx-card-border-color);
  }

  &--fit-to-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;

    & .cx-card-body {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }
  }

  &--delete-mode {
    @include var-color(
      'background-color',
      $cx-card-delete-mode-background-color
    );
  }

  &-body {
    &__delete {
      padding: $cx-card-body-delete-padding;
      &-msg {
        @include var-color('color', $cx-card-delete-msg-color);
        padding: $cx-card-body-delete-msg-padding;
      }
    }

    &__container {
      display: flex;
    }

    &__label-container {
      flex-grow: 2;
    }

    &__actions-container {
      display: flex;
      justify-content: flex-end;
      padding: $cx-card-body-actions-container-padding;
      .card-link {
        padding: $cx-card-body-actions-container-card-link-padding;
      }
    }
  }
}
